﻿<%@ Import Namespace="eCRAM.Model" %>
<%@ Import Namespace="eCRAM.WebSite.Models" %>
<%@ Import Namespace="eCRAM.UIElement" %>
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>

<%
    if (Request.IsAuthenticated) {
        
        List<MenuTab> menuTabList = new List<MenuTab>();
        menuTabList.Add(MenuTab.Create("Home", "Index", "Home"));
        menuTabList.Add(MenuTab.Create("CRAM", "CramList", "Cram"));
        //menuTabList.Add(MenuTab.Create("Help", "Help", "Home"));
       // menuTabList.Add(MenuTab.Create("About", "About", "Home"));

        if (Session["MySessionData"] != null)
        {
            User currentUser = ((SessionData)Session["MySessionData"]).CurrentUser;
            if (currentUser.Role == UserRole.Administrator)
            {
                menuTabList.Add(MenuTab.Create("Administration", "UserList", "Account"));
            }
        }
        %><%= Html.TabbedMenu(menuTabList)%>
         <%--<li><%= Html.ActionLink("Accueil", "Index", "Home")%></li>--%>
<%
    }
%>
